1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 package com.sun.java.util.jar.pack;
27
28 import java.util.ListResourceBundle;
29
30 public class DriverResource extends ListResourceBundle {
31 public static final String VERSION ="VERSION";
32 public static final String BAD_ARGUMENT ="BAD_ARGUMENT";
33 public static final String BAD_OPTION ="BAD_OPTION";
34 public static final String BAD_REPACK_OUTPUT="BAD_REPACK_OUTPUT";
35 public static final String DETECTED_ZIP_COMMENT="DETECTED_ZIP_COMMENT";
36 public static final String SKIP_FOR_REPACKED ="SKIP_FOR_REPACKED";
37 public static final String WRITE_PACK_FILE ="WRITE_PACK_FILE";
38 public static final String WIRTE_PACKGZ_FILE="WIRTE_PACKGZ_FILE";
39 public static final String SKIP_FOR_MOVE_FAILED="SKIP_FOR_MOVE_FAILED";
40 public static final String PACK_HELP="PACK_HELP";
41 public static final String UNPACK_HELP ="UNPACK_HELP";
42 public static final String MORE_INFO = "MORE_INFO";
43 public static final String DUPLICATE_OPTION = "DUPLICATE_OPTION";
44 public static final String BAD_SPEC = "BAD_SPEC";
45
46
47 private static final String PARAMETER_V = " -v, --verbose increase program verbosity";
48 private static final String PARAMETER_Q = " -q, --quiet set verbosity to lowest level";
49 private static final String PARAMETER_LF = " -l{F}, --log-file={F} output to the given log file, or '-' for System.out";
50 private static final String PARAMETER_H = " -?, -h, --help print this message";
51 private static final String PARAMETER_VER = " -V, --version print program version";
52 private static final String PARAMETER_J = " -J{X} pass option X to underlying Java VM";
53
54
55
56
57
58 private static final Object[][] resource= {
59 {VERSION,"{0} version {1}"},
60 {BAD_ARGUMENT,"Bad argument: {0}"},
61 {BAD_OPTION,"Bad option: {0}={1}"},
62 {BAD_REPACK_OUTPUT,"Bad --repack output: {0}"},
63 {DETECTED_ZIP_COMMENT,"Detected ZIP comment: {0}"},
64 {SKIP_FOR_REPACKED,"Skipping because already repacked: {0}"},
65 {WRITE_PACK_FILE,"To write a *.pack file, specify --no-gzip: {0}"},
66 {WIRTE_PACKGZ_FILE,"To write a *.pack.gz file, specify --gzip: {0}"},
67 {SKIP_FOR_MOVE_FAILED,"Skipping unpack because move failed: {0}"},
68 {PACK_HELP,new String[]{
69 "Usage: pack200 [-opt... | --option=value]... x.pack[.gz] y.jar",
70 "",
71 "Packing Options",
72 " -g, --no-gzip output a plain *.pack file with no zipping",
73 " --gzip (default) post-process the pack output with gzip",
74 " -G, --strip-debug remove debugging attributes while packing",
75 " -O, --no-keep-file-order do not transmit file ordering information",
76 " --keep-file-order (default) preserve input file ordering",
77 " -S{N}, --segment-limit={N} output segment limit (default N=1Mb)",
78 " -E{N}, --effort={N} packing effort (default N=5)",
79 " -H{h}, --deflate-hint={h} transmit deflate hint: true, false, or keep (default)",
80 " -m{V}, --modification-time={V} transmit modtimes: latest or keep (default)",
81 " -P{F}, --pass-file={F} transmit the given input element(s) uncompressed",
82 " -U{a}, --unknown-attribute={a} unknown attribute action: error, strip, or pass (default)",
83 " -C{N}={L}, --class-attribute={N}={L} (user-defined attribute)",
84 " -F{N}={L}, --field-attribute={N}={L} (user-defined attribute)",
85 " -M{N}={L}, --method-attribute={N}={L} (user-defined attribute)",
86 " -D{N}={L}, --code-attribute={N}={L} (user-defined attribute)",
87 " -f{F}, --config-file={F} read file F for Pack200.Packer properties",
88 PARAMETER_V ,
89 PARAMETER_Q ,
90 PARAMETER_LF ,
91 PARAMETER_H ,
92 PARAMETER_VER ,
93 PARAMETER_J,
94 "",
95 "Notes:",
96 " The -P, -C, -F, -M, and -D options accumulate.",
97 " Example attribute definition: -C SourceFile=RUH .",
98 " Config. file properties are defined by the Pack200 API.",
99 " For meaning of -S, -E, -H-, -m, -U values, see Pack200 API.",
100 " Layout definitions (like RUH) are defined by JSR 200.",
101 "",
102 "Repacking mode updates the JAR file with a pack/unpack cycle:",
103 " pack200 [-r|--repack] [-opt | --option=value]... [repackedy.jar] y.jar\n"
104 }
105 },
106 {UNPACK_HELP,new String[]{
107 "Usage: unpack200 [-opt... | --option=value]... x.pack[.gz] y.jar\n",
108 "",
109 "Unpacking Options",
110 " -H{h}, --deflate-hint={h} override transmitted deflate hint: true, false, or keep (default)",
111 " -r, --remove-pack-file remove input file after unpacking",
112 PARAMETER_V ,
113 PARAMETER_Q ,
114 PARAMETER_LF ,
115 PARAMETER_H ,
116 PARAMETER_VER ,
117 PARAMETER_J,
118 }
119 },
120
121 {MORE_INFO,"(For more information, run {0} --help .)"},
122 {DUPLICATE_OPTION,"duplicate option: {0}"},
123 {BAD_SPEC,"bad spec for {0}: {1}"},
124 };
125
126 protected Object[][] getContents() {
127 return resource;
128 }
129
130
131 }